<?php

/**
 * Zend Portal
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @copyright  Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @author 
 */
 
echo '<?xml version="1.0" encoding="UTF-8" ?>';
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>View Feed</title>
</head>

<body>
	<h1>View <?php if ($isGroup = ($this->feed['type'] == 'group')): ?>Group<?php else: ?>Feed<?php endif ?></h1>
	<?php if ($this->feed): ?>
	<table>
		<tr>
			<th>Name:</th>
			<td>
				<?php echo $this->escape($this->feed['name']) ?>
			</td>
		</tr>
		<tr>
			<th>Description:</th>
			<td>
				<?php echo $this->escape($this->feed['description']) ?>
			</td>
		</tr>
		<?php if (!$isGroup): ?>
		<tr>
			<th>URL:</th>
			<td>
				<a href="<?php echo $this->escape($this->feed['url']) ?>"><?php echo $this->escape($this->feed['url']) ?></a>
			</td>
		</tr>
		<?php endif ?>
		<?php if($this->group): ?>
		<tr>
			<th>Parent Group:</th>
			<td>
				<a href="<?php echo $this->url(array('id'=>$this->feed['group_id'])) ?>"><?php echo $this->escape($this->group['name']) ?></a>
			</td>
		</tr>
		<?php endif ?>
		<?php /* TODO? if ($isGroup): ?>
		<?php if ($this->childGroups): ?>
		<tr>
			<th>Child Groups:</th>
			<td>
				<ul>
					<?php foreach ($this->childGroups as $group): ?>
					<li></li>
					<?php endforeach ?>
				</ul>
			</td>
		</tr>
		<tr>
			<th>Child Feeds:</th>
			<td></td>
		</tr>
		<?php endif */ ?>
	</table>
	<?php else: ?>
	<h3>'<?php echo $this->escape($this->id) ?>' is not a valid feed/group id.</h3>
	<?php endif ?>
</body>

</html>
